<template>
  <div class="pageContent">
    <!-- 查询 -->
    <adminSearch @searches="searches" />
    <!-- 表格 -->
    <adminTemlist :data="tableData" style="margin: 1vw 0 0" />
  </div>
</template>

<script>
import adminSearch from "./module/adminSearch.vue";
import adminTemlist from "./module/adminTemlist.vue";
export default {
  components: {
    adminSearch,
    adminTemlist,
  },
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    this.getlist({
      pageSize: 5,
      pageNo: 1,
      role: this.$store.state.user.info.role,
    });
  },
  methods: {
    searches(e) {
      let obj = {
        pageSize: 5,
        pageNo: 1,
        role: this.$store.state.user.info.role,
      };
      obj = Object.assign(obj, e);
      this.getlist(obj);
    },
    //列表
    getlist(e) {
      this.$http.get("/getDailyAll", { params: e }).then((res) => {
        if (res.code == 200) {
          this.tableData = res.data.data;
        } else {
          this.$message.error(res.msg);
        }
      });
    },
  },
};
</script>

<style lang='scss' scoped>
@import url("../../styles/pages.scss");
</style>